<template>
    <div style="line-height: 60px; display: flex">
        <div style="flex: 1;">
            <!--            <span :class="collapseBtnClass" style="cursor: pointer; font-size: 18px" @click="collapse"></span>  -->
<!--            <span :class="collapseBtnClass" style="cursor: pointer; font-size: 18px" @click="collapse"></span>-->
        </div>
        <el-dropdown style="width: 150px; cursor: pointer;">
            <span>，欢迎您！<i class="el-icon-arrow-down" style="margin-left: 5px"></i></span>
            <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>个人信息</el-dropdown-item>
                <el-dropdown-item ><span @click="SignOut">退出</span></el-dropdown-item>
            </el-dropdown-menu>
        </el-dropdown>
    </div>
</template>

<script>
    export default {
        name: "Header",
        data(){
            return{
                stu:localStorage.getItem('stu') ? JSON.parse(localStorage.getItem('stu')) : {},
            }
        },
        props: {
            collapseBtnClass: String,
            collapse: Boolean,
        },

        methods:{
            SignOut(){
                //alert("啊哈哈")
                window.sessionStorage.clear();
                this.$router.push({
                    path: '/Login',
                });
                this.$message.success("退出成功")
            }
        }
    }
</script>

<style scoped>

</style>
